﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ucThemHocVien.ascx.cs"
    Inherits="STT.Admin.UserControls.ucThemHocVien" %>


<div id="content-header">
    <div id="breadcrumb">
        <a href="../Admin/Default.aspx?idpage=1" class="tip-bottom" data-original-title="Về bảng điều khiển">
            <i class="icon-home"></i>Trang chính
        </a>
        <a href="../Admin/Default.aspx?idpage=qlhv" class="current">Quản lý học viên</a>
        <a href="#" class="current">Thêm học viên</a>
    </div>
</div>

<div class="widget-box collapsible">
    <div class="widget-title">
        <a href="#collapseOne" data-toggle="collapse" class="">
            <span class="icon"><i class="icon-th"></i></span>
            <h5>Thêm học viên</h5>
        </a>
    </div>

    <div class="in collapse" id="collapseOne" style="height: auto;">
        <div class="widget-content nopadding">
            <div class="dataTables_wrapper" role="grid">
                <%-- Cac dieu kien tim kiem --%>
                <div class="container-fluid">
                    <div class="row-fluid">
                        <div class="span6">
                            <div class="control-group">
                                <label class="control-label">Họ: </label>
                                <div class="controls">
                                    <asp:TextBox ID="txtTenHV" runat="server"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator7" ValidationExpression="^[\s\S]{0,3}$"
                                        ToolTip="Bạn chưa nhập tên Học viên" ForeColor="Red" Font-Bold="true" ControlToValidate="txtTenHV"
                                        runat="server" ErrorMessage="(*)" ValidationGroup="validation"></asp:RequiredFieldValidator>
                                </div>
                            </div>
                            <div class="control-group">
                                <label class="control-label">Tên: </label>
                                <div class="controls">
                                    <asp:TextBox ID="txtTen" runat="server"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator8" ValidationExpression="^[\s\S]{0,3}$"
                                        ToolTip="Bạn chưa nhập tên Học viên" ForeColor="Red" Font-Bold="true" ControlToValidate="txtTen"
                                        runat="server" ErrorMessage="(*)" ValidationGroup="validation"></asp:RequiredFieldValidator>
                                </div>
                            </div>
                            <div class="control-group">
                                <label class="control-label">Ngày sinh: </label>
                                <div class="controls">
                                    <asp:TextBox ID="txtNgaySinh" runat="server" TextMode="Date"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator10" ValidationExpression="^[\s\S]{0,3}$"
                                        ToolTip="Bạn chưa nhập tên Học viên" ForeColor="Red" Font-Bold="true" ControlToValidate="txtNgaySinh"
                                        runat="server" ErrorMessage="(*)" ValidationGroup="validation"></asp:RequiredFieldValidator>
                                </div>
                            </div>
                            <div class="control-group">
                                <label class="control-label">Giới tính: </label>
                                <div class="controls">
                                    <asp:DropDownList ID="ddlGioiTinh" runat="server">
                                        <asp:ListItem Text="---Chọn---" Selected="True" Value="-1"></asp:ListItem>
                                        <asp:ListItem Text="Nam" Value="Nam"></asp:ListItem>
                                        <asp:ListItem Text="Nữ" Value="Nữ"></asp:ListItem>
                                    </asp:DropDownList>
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" InitialValue="-1"
                                        ValidationGroup="validation"
                                        ControlToValidate="ddlGioiTinh" ErrorMessage="(*)" ForeColor="Red" ToolTip="Bạn chưa chọn"></asp:RequiredFieldValidator>

                                </div>
                            </div>
                            <div class="control-group">
                                <label class="control-label">Quê quán: </label>
                                <div class="controls">
                                    <asp:TextBox ID="txtQueQuan" runat="server"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator11" ValidationExpression="^[\s\S]{0,3}$"
                                        ToolTip="Bạn chưa nhập quê quán" ForeColor="Red" Font-Bold="true" ControlToValidate="txtQueQuan"
                                        runat="server" ErrorMessage="(*)" ValidationGroup="validation"></asp:RequiredFieldValidator>
                                </div>
                            </div>
                            <div class="control-group">
                                <label class="control-label">Địa chỉ: </label>
                                <div class="controls">
                                    <asp:TextBox ID="txtDiaChi" runat="server"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator12" ValidationExpression="^[\s\S]{0,3}$"
                                        ToolTip="Bạn chưa nhập địa chỉ" ForeColor="Red" Font-Bold="true" ControlToValidate="txtDiaChi"
                                        runat="server" ErrorMessage="(*)" ValidationGroup="validation"></asp:RequiredFieldValidator>
                                </div>
                            </div>

                            <div class="control-group">
                                <label class="control-label">Dân tộc: </label>
                                <div class="controls">
                                    <asp:DropDownList ID="ddlDanToc" runat="server"></asp:DropDownList>
                                    <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/Admin/Default.aspx?idpage=qldt">
                        <img  src="../../img/add.png" title="Thêm mới Dân tộc"/>
                                    </asp:HyperLink>
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator17" runat="server" InitialValue="-1"
                                        ValidationGroup="validation"
                                        ControlToValidate="ddlDanToc" ErrorMessage="(*)" ForeColor="Red" ToolTip="Bạn chưa chọn"></asp:RequiredFieldValidator>

                                </div>
                            </div>
                            <div class="control-group">
                                <label class="control-label">Nhóm ngạch lương: </label>
                                <div class="controls">
                                    <asp:DropDownList ID="ddlNhomNL" runat="server" AutoPostBack ="true" OnSelectedIndexChanged="ddlNhomNL_SelectedIndexChanged"></asp:DropDownList>
                                    <asp:HyperLink ID="HyperLink3" runat="server" NavigateUrl="~/Admin/Default.aspx?idpage=qlnnl">
                        <img  src="../../img/add.png" title="Thêm mới Nhóm ngạch lương"/>
                                    </asp:HyperLink>
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator13" runat="server" InitialValue="-1"
                                        ValidationGroup="validation"
                                        ControlToValidate="ddlNhomNL" ErrorMessage="(*)" ForeColor="Red" ToolTip="Bạn chưa chọn"></asp:RequiredFieldValidator>

                                </div>
                            </div>
                            <div class="control-group">
                                <label class="control-label">Mã ngạch lương: </label>
                                <div class="controls">
                                    <asp:DropDownList ID="ddlMaNL" runat="server"  Enabled="false"></asp:DropDownList>
                                    <asp:HyperLink ID="HyperLink8" runat="server" NavigateUrl="~/Admin/Default.aspx?idpage=qlmnl">
                        <img  src="../../img/add.png" title="Thêm mới Mã ngạch lương"/>
                                    </asp:HyperLink>
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator18" runat="server" InitialValue="-1"
                                        ValidationGroup="validation"
                                        ControlToValidate="ddlMaNL" ErrorMessage="(*)" ForeColor="Red" ToolTip="Bạn chưa chọn"></asp:RequiredFieldValidator>

                                </div>
                            </div>
                            <div class="control-group">
                                <label class="control-label">Hệ số lương: </label>
                                <div class="controls">
                                    <asp:DropDownList ID="ddlHeSL" runat="server"  Enabled="false"></asp:DropDownList>
                                    <asp:HyperLink ID="HyperLink9" runat="server" NavigateUrl="~/Admin/Default.aspx?idpage=qlhsl">
                        <img  src="../../img/add.png" title="Thêm mới Hệ số lương"/>
                                    </asp:HyperLink>
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator19" runat="server" InitialValue="-1"
                                        ValidationGroup="validation"
                                        ControlToValidate="ddlHeSL" ErrorMessage="(*)" ForeColor="Red" ToolTip="Bạn chưa chọn"></asp:RequiredFieldValidator>

                                </div>
                            </div>
                            <div class="control-group">
                                <label class="control-label">Số CMT: </label>
                                <div class="controls">
                                    <asp:TextBox ID="txtSoCMT" runat="server"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator14" ValidationExpression="^[\s\S]{0,3}$"
                                        ToolTip="Bạn chưa nhập số CMT" ForeColor="Red" Font-Bold="true" ControlToValidate="txtSoCMT"
                                        runat="server" ErrorMessage="(*)" ValidationGroup="validation"></asp:RequiredFieldValidator>
                                </div>
                            </div>
                            <div class="control-group">
                                <label class="control-label">Ngày cấp: </label>
                                <div class="controls">
                                    <asp:TextBox ID="txtNgayCap" runat="server" TextMode="Date"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator15" ValidationExpression="^[\s\S]{0,3}$"
                                        ToolTip="Bạn chưa nhập ngày cấp" ForeColor="Red" Font-Bold="true" ControlToValidate="txtNgayCap"
                                        runat="server" ErrorMessage="(*)" ValidationGroup="validation"></asp:RequiredFieldValidator>
                                </div>
                            </div>
                            <div class="control-group">
                                <label class="control-label">Nơi cấp: </label>
                                <div class="controls">
                                    <asp:TextBox ID="txtNoiCap" runat="server"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator16" ValidationExpression="^[\s\S]{0,3}$"
                                        ToolTip="Bạn chưa nhập nơi cấp" ForeColor="Red" Font-Bold="true" ControlToValidate="txtNoiCap"
                                        runat="server" ErrorMessage="(*)" ValidationGroup="validation"></asp:RequiredFieldValidator>
                                </div>
                            </div>

                        </div>
                        <div class="span6">
                            <div class="control-group">
                                <label class="control-label">Hiệu chỉnh thân nhân: </label>
                                <div class="controls">
                                    <asp:TextBox ID="txtHieuChinhThanNhan" runat="server"></asp:TextBox>
                                </div>
                            </div>

                            <div class="control-group">
                                <label class="control-label">Số điện thoại: </label>
                                <div class="controls">
                                    <asp:TextBox ID="txtSDT" runat="server"></asp:TextBox>
                                    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtSDT"
                                        ErrorMessage="(*)" ValidationExpression="09\d{8}|01[2689]\d{8}" ForeColor="Red"
                                        ValidationGroup="validation"
                                        ToolTip="Bạn Nhập sai định dạng số điện thoại"></asp:RegularExpressionValidator>
                                </div>

                                <div class="control-group">
                                    <label class="control-label">Chức vụ: </label>
                                    <div class="controls">
                                        <asp:DropDownList ID="ddlChucVu" runat="server"></asp:DropDownList>
                                        <asp:HyperLink ID="HyperLink7" runat="server" NavigateUrl="~/Admin/Default.aspx?idpage=qlcv">
                        <img  src="../../img/add.png" title="Thêm mới chức vụ"/>
                                        </asp:HyperLink>
                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" InitialValue="-1"
                                            ValidationGroup="validation"
                                            ControlToValidate="ddlChucVu" ErrorMessage="(*)" ForeColor="Red" ToolTip="Bạn chưa chọn"></asp:RequiredFieldValidator>

                                    </div>
                                </div>
                                <div class="control-group">
                                    <label class="control-label">Đơn vị: </label>
                                    <div class="controls">
                                        <asp:DropDownList ID="ddlDonVi" runat="server"></asp:DropDownList>
                                        <%--<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/Default.aspx?idpage=">
                        <img  src="../../img/add.png" title="Thêm mới đơn vị">
                                        </asp:HyperLink>
                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" InitialValue="-1"
                                            ValidationGroup="validation"
                                            ControlToValidate="ddlDonVi" ErrorMessage="(*)" ForeColor="Red" ToolTip="Bạn chưa chọn"></asp:RequiredFieldValidator>--%>
                                    </div>
                                </div>
                                <div class="control-group">
                                    <label class="control-label">Phòng ban: </label>
                                    <div class="controls">
                                        <asp:DropDownList ID="ddlPhongBan" runat="server"></asp:DropDownList>
                                        <asp:HyperLink ID="HyperLink6" runat="server" NavigateUrl="~/Admin/Default.aspx?idpage=qlpb">
                        <img  src="../../img/add.png" title="Thêm mới phòng ban"/>
                                        </asp:HyperLink>
                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" InitialValue="-1"
                                            ControlToValidate="ddlPhongBan" ErrorMessage="(*)" ForeColor="Red" ToolTip="Bạn chưa chọn"></asp:RequiredFieldValidator>

                                    </div>
                                </div>
                                <div class="control-group">
                                    <label class="control-label">Văn hóa: </label>
                                    <div class="controls">
                                        <asp:DropDownList ID="ddlTDVanHoa" runat="server"></asp:DropDownList>
                                        <asp:HyperLink ID="HyperLink5" runat="server" NavigateUrl="~/Admin/Default.aspx?idpage=qltdvh">
                        <img  src="../../img/add.png" title="Thêm mới văn hóa"/>
                                        </asp:HyperLink>
                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" InitialValue="-1"
                                            ValidationGroup="validation"
                                            ControlToValidate="ddlTDVanHoa" ErrorMessage="(*)" ForeColor="Red" ToolTip="Bạn chưa chọn"></asp:RequiredFieldValidator>

                                    </div>
                                </div>
                                <div class="control-group">
                                    <label class="control-label">Trình độ: </label>
                                    <div class="controls">
                                        <asp:DropDownList ID="ddTrinhDo" runat="server"></asp:DropDownList>
                                        <asp:HyperLink ID="HyperLink4" runat="server" NavigateUrl="~/Admin/Default.aspx?idpage=qltdcm">
                        <img  src="../../img/add.png" title="Thêm mới trình độ"/>
                                        </asp:HyperLink>
                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" InitialValue="-1"
                                            ValidationGroup="validation"
                                            ControlToValidate="ddTrinhDo" ErrorMessage="(*)" ForeColor="Red" ToolTip="Bạn chưa chọn"></asp:RequiredFieldValidator>

                                    </div>
                                </div>
                                <div class="control-group">
                                    <label class="control-label">Lớp học: </label>
                                    <div class="controls">
                                        <asp:DropDownList ID="ddLopHoc" runat="server"></asp:DropDownList>
                                        <asp:HyperLink ID="HyperLink2" runat="server" NavigateUrl="~/Admin/Default.aspx?idpage=qllh">
                        <img  src="../../img/add.png" title="Thêm mới lớp học"/>
                                        </asp:HyperLink>
                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator9" runat="server" InitialValue="-1"
                                            ValidationGroup="validation"
                                            ControlToValidate="ddLopHoc" ErrorMessage="(*)" ForeColor="Red" ToolTip="Bạn chưa chọn"></asp:RequiredFieldValidator>

                                    </div>
                                </div>
                                <div class="control-group">
                                    <label class="control-label">Ghi chú: </label>
                                    <div class="controls">
                                        <asp:TextBox ID="txtGhiChu" runat="server" Rows="2" TextMode="MultiLine"></asp:TextBox>
                                    </div>
                                </div>
                            </div>
                            <div class="control-group">
                                <label class="control-label">Ảnh đại diện: </label>
                                <div class="controls">
                                    <asp:Image ID="anhDaiDien" Width="80px" runat="server" ImageUrl="~/Uploads/Avatar/avatar-default.jpg" />
                                    <asp:FileUpload ID="upAnhDaiDien" runat="server" class="hide" />
                                    <asp:HiddenField ID="imgAnhDaiDienCu" runat="server" Value='<%# Bind("Anh") %>' />
                                    <%--<asp:TextBox ID="txtAnh"  runat="server" Text='<%# Bind("Anh") %>'></asp:TextBox>--%>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="row-fluid">
                        <div class="control-group">
                            <label class="control-label">Ngoại ngữ: </label>
                            <div class="controls">
                                <%--                                <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                                    <%--<ContentTemplate>--%>
                                <asp:GridView ID="hvNgoaiNgu" runat="server" AutoGenerateColumns="False" CssClass="table-grid table table-hover table-bordered"
                                    ShowHeaderWhenEmpty="True" ShowFooter="True" EnableViewState="False"
                                    OnRowDeleting="gvNgoaiNgu_RowDeleting" DataKeyNames="MaNgoaiNgu"
                                    OnRowDataBound="hvNgoaiNgu_RowDataBound">
                                    <Columns>
                                        <asp:TemplateField HeaderText="Tên ngoại ngữ" SortExpression="TenNgoaiNgu">
                                            <ItemTemplate>
                                                <asp:DropDownList ID="ddlTenNgoaiNgu" runat="server" Enabled="false">
                                                </asp:DropDownList>

                                            </ItemTemplate>
                                            <ItemStyle CssClass="span1"></ItemStyle>
                                            <FooterTemplate>
                                                <asp:DropDownList ID="ddlTenNgoaiNgu" runat="server">
                                                </asp:DropDownList>
                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator6"
                                                    ToolTip="Bạn chưa nhập nơi cấp" ForeColor="Red" Font-Bold="true" ControlToValidate="ddlTenNgoaiNgu"
                                                    runat="server" ErrorMessage="(*)" ValidationGroup="nn" InitialValue="-1"></asp:RequiredFieldValidator>
                                            </FooterTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Ngày cấp" SortExpression="NgayCap">
                                            <ItemTemplate>
                                                <asp:Label ID="txtNgayCap" runat="server" Text='<%# Bind("NgayCap", "{0:dd-MM-yyyy}") %>'></asp:Label>
                                            </ItemTemplate>
                                            <FooterTemplate>
                                                <asp:TextBox ID="txtNgayCap" runat="server" TextMode="Date"></asp:TextBox>
                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator5" ValidationExpression="^[\s\S]{0,3}$"
                                                    ToolTip="Bạn chưa nhập ngày cấp" ForeColor="Red" Font-Bold="true" ControlToValidate="txtNgayCap"
                                                    runat="server" ErrorMessage="(*)" ValidationGroup="nn"></asp:RequiredFieldValidator>
                                            </FooterTemplate>
                                            <ItemStyle CssClass="span1"></ItemStyle>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Nơi cấp" SortExpression="NoiCap">
                                            <ItemTemplate>
                                                <asp:Label ID="txtNoiCap" runat="server" Text='<%# Bind("NoiCap") %>'></asp:Label>
                                            </ItemTemplate>
                                            <ItemStyle CssClass="span1"></ItemStyle>
                                            <FooterTemplate>
                                                <asp:TextBox ID="txtNoiCap" runat="server"></asp:TextBox>
                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" ValidationExpression="^[\s\S]{0,3}$"
                                                    ToolTip="Bạn chưa nhập nơi cấp" ForeColor="Red" Font-Bold="true" ControlToValidate="txtNoiCap"
                                                    runat="server" ErrorMessage="(*)" ValidationGroup="nn"></asp:RequiredFieldValidator>
                                            </FooterTemplate>
                                            <ItemStyle Font-Bold="True" CssClass="span1" />
                                        </asp:TemplateField>
                                        <asp:TemplateField ShowHeader="False">
                                            <ItemTemplate>
                                                <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" CommandName="Delete"
                                                    Text="Xóa"
                                                    OnClientClick="return ConfirmDelete('Có chắc bạn muốn xóa?');"></asp:LinkButton>
                                            </ItemTemplate>
                                            <FooterTemplate>
                                                <asp:Button ID="btThemMoiNgoaiNgu" runat="server" Text="Thêm ngoại ngữ" CssClass="btn btn-primary"
                                                    OnClick="btThemMoiNgoaiNgu_Click" CausesValidation="true"
                                                    ValidationGroup="nn" />
                                            </FooterTemplate>
                                            <ItemStyle Font-Bold="True" CssClass="span1" />
                                        </asp:TemplateField>
                                    </Columns>
                                    <EmptyDataTemplate>
                                        <tr>
                                            <td>
                                                <asp:DropDownList ID="ddlTenNgoaiNgu" runat="server">
                                                </asp:DropDownList>
                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator6"
                                                    ToolTip="Bạn chưa nhập nơi cấp" ForeColor="Red" Font-Bold="true" ControlToValidate="ddlTenNgoaiNgu"
                                                    runat="server" ErrorMessage="(*)" ValidationGroup="nn" InitialValue="-1"></asp:RequiredFieldValidator>
                                            </td>
                                            <td>
                                                <asp:TextBox ID="txtNgayCap" runat="server" Text='<%# Bind("NgayCap", "{0:yyyy-MM-dd}") %>'
                                                    TextMode="Date"></asp:TextBox>
                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator5" ValidationExpression="^[\s\S]{0,3}$"
                                                    ToolTip="Bạn chưa nhập ngày cấp" ForeColor="Red" Font-Bold="true" ControlToValidate="txtNgayCap"
                                                    runat="server" ErrorMessage="(*)" ValidationGroup="nn"></asp:RequiredFieldValidator>
                                            </td>
                                            <td>
                                                <asp:TextBox ID="txtNoiCap" runat="server" Text='<%# Bind("NoiCap") %>'></asp:TextBox>
                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" ValidationExpression="^[\s\S]{0,3}$"
                                                    ToolTip="Bạn chưa nhập nơi cấp" ForeColor="Red" Font-Bold="true" ControlToValidate="txtNoiCap"
                                                    runat="server" ErrorMessage="(*)" ValidationGroup="nn"></asp:RequiredFieldValidator>
                                            </td>
                                            <td>
                                                <asp:Button ID="btThemMoiNgoaiNgu" runat="server" Text="Thêm ngoại ngữ" CssClass="btn btn-primary"
                                                    OnClick="btThemMoiNgoaiNgu_Click" CausesValidation="true"
                                                    ValidationGroup="nn" />
                                            </td>
                                        </tr>
                                    </EmptyDataTemplate>
                                </asp:GridView>
                                <%--                                   
                                <%--</asp:UpdatePanel>--%>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="fg-toolbar ui-toolbar ui-widget-header ui-corner-bl">
            <asp:Button ID="btThemMoi" runat="server" CssClass="btn btn-primary" Text="Thêm mới"
                OnClick="btThemMoi_Click" CausesValidation="true"
                ValidationGroup="validation" />
            <asp:Button ID="btSua" runat="server" CssClass="btn btn-primary" Text="Lưu"
                OnClick="btSua_Click" CausesValidation="true"
                ValidationGroup="validation" />
            <a class="btn" href="../Admin/Default.aspx?idpage=qldshv">Hủy</a>
            
             
        </div>
    </div>
</div>

<script>
    function OpenUpload(fileUpload) {
        $(fileUpload).click();
    }

    $('#<%= anhDaiDien.ClientID %>').click(function () {
        $('#<%= upAnhDaiDien.ClientID%>').click();
    });
    $('#<%= upAnhDaiDien.ClientID%>').change(function () {
        readURL(this, '#<%= anhDaiDien.ClientID %>');
    });
    function readURL(input, imgAnhDaiDien) {

        if (input.files && input.files[0]) {
            var reader = new FileReader();
            reader.onload = function (e) {
                $(imgAnhDaiDien).attr('src', e.target.result);
            }
            reader.readAsDataURL(input.files[0]);
        }
    }
</script>

